
from helper.XlsHelper import XlsHelper
import os
print(os.getcwd())


xlsHelper=XlsHelper()
# fileName='../templates/个人或团队荣誉.xlsx'
# sheet=xlsHelper.openXls(fileName)
# allData=xlsHelper.readAllData(sheet)

test=[
        {
            "advisor": "1",
            "award_level": "1",
            "certificate_copy": "1",
            "competition_name": "1",
            "id": 1,
            "job_number": "1",
            "number": "1",
            "remark": "1",
            "teams": "1"
        },
        {
            "advisor": "12",
            "award_level": "1",
            "certificate_copy": "12322",
            "competition_name": "1",
            "id": 24,
            "job_number": "21",
            "number": "1",
            "remark": "21",
            "teams": "1"
        }
    ]
tableType=3
tableDic=XlsHelper.xlsDic[XlsHelper.tableList[tableType]]
print(tableDic)
# allData=[]
# for each in test:
#     part=[]
#     for i in tableDic:
#         part.append(each[i])
#     print(part)
#     allData.append(part)
# print(allData)
# xlsHelper.writeXlsByType(allData,'type3.xls',tableType)
xlsHelper.writeXlsByType(test,'type222.xls',tableType)